package com.masterclient.app.businessmodule.vipmodule.api;


import com.eoner.baselib.container.CommonBaseResponse;
import com.eoner.managerlibrary.netsign.core.FCRetrofitManager;
import com.masterclient.app.businessmodule.vipmodule.bean.Income;
import com.masterclient.app.businessmodule.vipmodule.bean.Profit;

import io.reactivex.Observable;


public class ProfitsListService {

    private static ProfitsListApi api;
    private static ProfitsListService instance;

    public static ProfitsListService getInstance() {
        synchronized (ProfitsListService.class) {
            if (instance == null) {
                instance = new ProfitsListService();
            }
        }
        return instance;
    }

    private ProfitsListService() {
        api = FCRetrofitManager.getInstance().getRetrofit().create(ProfitsListApi.class);
    }

    /**
     * 获取我的收益
     */
    public Observable<CommonBaseResponse<Profit>> getProfits(int status,int page, int pageSize) {
        return api.getProfits(status,page,pageSize);
    }
    /**
     * 获取我的收入
     */
    public Observable<CommonBaseResponse<Income>> getIncome(int status, int page, int pageSize) {
        return api.getIncome(status,page,pageSize);
    }

}
